import { Query } from '@/zondyTools/mapgis-api/Query';

const service = {
    name: 'guanggu',
    layerId: 2
};

const fetchData = () => {
    return new Promise((resolve, reject) => {
        Query.queryByLayerId({
            service,
            success: (res) => {
                resolve(res); // 将结果通过Promise返回
            },
            error: (err) => {
                reject(err); // 错误处理
            }
        });
    });
};

export { fetchData }; // 导出fetchData函数
